package cn.tom.dao;

import cn.tom.entity.Book;
import cn.tom.entity.OrdItem;
import cn.tom.entity.Order;
import cn.tom.entity.Order2u;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
public interface OrderMapper {
    List<Order> findPageOrdersByUid(Map<String, Object> map);
    int getCountOrdersByUid(Map<String, Object> map);
    Integer addPay();

    List<OrdItem> findItemsByOrdid(int ordid);
    List<OrdItem> findItemsByOrdid2(Map<String,Object> map);

    List<Integer> findItemsBookIdByOrdid(@Param("ordid") int ordid);

    int updatePay(@Param("ordid") int i, @Param("payStatus") Integer payStatus);

    Order findOrdById(int i);

    void addOrd(Order order);

    void addItem(OrdItem ordItem);

    int getCountOrders2u(Map<String, Object> map);

    List<Order2u> findPageOrders2u(Map<String, Object> map);

    int updateShip(@Param("ordid") int i, @Param("shipStatus") int i2, @Param("shipno") String str, @Param("shipper") String str2, @Param("tship") Date date);

    Order2u findOrder2uByOrdid(int i);

    List<Integer> findBookidByOrdid(@Param("ordid") int ordid);
}
